package per.dj.testpro.entity;

import io.netty.channel.ChannelHandlerContext;
import lombok.Data;

import java.util.Date;

@Data
public class GpsConnection {
    //连接Id
    private long sessionId;
    //终端Sim卡号
    private String simNo;
    //连接时间
    private Date createDate;
    //最新在线时间
    private Date onlineDate;
    //心跳时间
    private Date heartDate;
    //收到的包的数量
    private int packageNum;
    //定位包数量
    private int positionPackageNum;
    //断开次数
    private int disconnectTimes;
    //错误包数
    private int errorPacketNum;
    //是否已连接
    private boolean connected;
    //是否定位
    private boolean located;

    private ChannelHandlerContext nettyChannel;

    private long heartTime;


    public GpsConnection(String simNo, ChannelHandlerContext nettyChannel)
    {
        setSimNo(simNo);
        setNettyChannel(nettyChannel);
        setCreateDate(new Date());
        setOnlineDate(new Date());
    }

}
